package org.courierio.jeesite.mvc.controller;

import org.courierio.jeesite.handler.ProductTypeHandler;
import org.courierio.jeesite.handler.UserHandler;
import org.courierio.jeesite.handler.support.ProductTypeHandlerSupport;
import org.courierio.jeesite.handler.support.UserHandlerSupport;
import org.courierio.jeesite.search.UserSearch;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import javax.annotation.Resource;

/**
 * @author long.shiyu
 * @since 1.7
 */
@Controller
public class UserController {
    @Resource
    private UserHandler userHandler;
    @Resource
    private ProductTypeHandler productTypeHandler;

    @RequestMapping(value = "sayHello", method = RequestMethod.GET)
    public String sayHello(UserSearch search) {
        userHandler.findBySearch(search);
        productTypeHandler.findOne(1);
        return "/test";
    }
}
